package com.bawei.hilt_test;

import java.io.IOException;

import okhttp3.Interceptor;
import okhttp3.Request;
import okhttp3.Response;

public class TokenInterceptor implements Interceptor {
    @Override
    public Response intercept(Chain chain) throws IOException {
        //做具体的处理。。。。。
        String token = "";//从SP读取token
        Request request = chain.request().newBuilder().addHeader("token", token).build();
        return chain.proceed(request);
    }
}
